@(
bui: models.user.BaseUserInfo,
lui: models.user.LinkUserInfo,
eui: models.user.EduUserInfo,
pui: models.user.PersonUserInfo,
wui: models.user.WorkUserInfo,
ptui: models.user.PortraitUserInfo
)
@js_css={
<script type="text/javascript" src="@routes.Assets.at("javascripts/bootstrap-datetimepicker.min.js")" charset="UTF-8"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/bootstrap-datetimepicker.zh-CN.js")" charset="UTF-8"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$('#birth').datetimepicker({
	        language:  'zh-CN',
	        weekStart: 1,
	        todayBtn:  1,
			autoclose: 1,
			todayHighlight: 1,
			startView: 2,
			minView: 2,
			forceParse: 0
	    });
		//menu锁定
		$(".nav.navbar-nav li").removeClass("active");
		$(".nav.navbar-nav li").eq(1).addClass("active");

		//修改内容 
		profile("home");
		profile("link");
		profile("edu");
		profile("work");
		profile("profile");
		
		//tab页锁定
		 var Request = new Object();
		 Request = GetRequest();
		 var tab = Request['tab'];
		 var status = Request['status'];
		 if(tab=='link'){
			 $("#tab_"+tab).click(); 
			 if(status=='edit'){
				 $("#" + tab + "-btn").click();
			 }
		 }else if(tab=='edu'){
			 $("#tab_"+tab).click(); 
			 if(status=='edit'){
				 $("#" + tab + "-btn").click(); 
			 }
		 }else if(tab=='work'){
			 $("#tab_"+tab).click(); 
			 if(status=='edit'){
				 $("#" + tab + "-btn").click(); 
			 }
		 }else if(tab=='profile'){
			 $("#tab_"+tab).click();
			 if(status=='edit'){
				 $("#" + tab + "-btn").click(); 
			 }
		 }else if(tab=='protrait'){
			 $("#tab_"+tab).click();
		 }else{
			 $("#tab_home").click();
			 if(status=='edit'){
				 $("#home-btn").click(); 
			 }
		 }
		
		//上传头像
		$("#upload-pic").click(function(){
			$("#portrait-pic").click();
		});
		
		
	});
</script>
}
@main("个人中心",js_css) {
<div class="col-xs-10 col-md-10 col-xs-offset-1">

	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">个人资料</h3>
		</div>
		<div class="panel-body">
			<div class="col-xs-2 col-md-2">
				<div class="col-xs-12">
					<a class="thumbnail" href="#"> <img alt="100%x240"
						data-src="./js/holder.min.js/100%x240"
						@if(ptui.portrait == null || ptui.portrait == ""){
							src="http://meng-user.qiniudn.com/pic.png"
						}else{
							src="@ptui.portrait"
						}>
					</a>
				</div>
				<div class="col-xs-12 col-md-12">
					<div class="col-xs-10 col-xs-offset-1">@session.get("username")</div>
				</div>
			</div>
			<div class="col-xs-10">
				<ul class="nav nav-tabs" style="margin-bottom: 15px;">
					<li class="active"><a href="#home" id="tab_home" data-toggle="tab">基本资料</a></li>
					<li class=""><a href="#link" id="tab_link" data-toggle="tab">联系方式</a></li>
					<li class=""><a href="#edu" id="tab_edu" data-toggle="tab">教育情况</a></li>
					<li class=""><a href="#work" id="tab_work" data-toggle="tab">工作情况</a></li>
					<li class=""><a href="#profile" id="tab_profile" data-toggle="tab">个人信息</a></li>
					<li class=""><a href="#portrait" id="tab_protrait" data-toggle="tab">个人头像</a></li>
				</ul>
				<div id="myTabContent" class="tab-content">

					<div class="tab-pane fade active in" id="home">
						<div class="col-xs-12" id="home-show">
							<div class="col-xs-11">
								<h4>@session.get("username") 的基本资料</h4>
							</div>
							<div class="col-xs-1">
						    	<button id="home-btn" class="btn btn-sm btn-primary">修改</button>
						    </div>
							<table class="table table-responsive">
								<tbody>
									<tr>
										<td>用户名</td>
										<td>@bui.username</td>
									</tr>
									<tr>
										<td>真实姓名</td>
										<td>@bui.realname</td>
									</tr>
									<tr>
										<td>性别</td>
										<td>@bui.gender</td>
									</tr>
									<tr>
										<td>生日</td>
										<td>@bui.birth</td>
									</tr>
									<tr>
										<td>出生地</td>
										<td>@bui.birth_addr</td>
									</tr>
									<tr>
										<td>居住地</td>
										<td>@bui.domicile</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="col-xs-12 hide" id="home-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/base/modify">
									<fieldset>
										<h4>@session.get("username") 的基本资料</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="username" class="col-lg-2 control-label">用户名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="username" disabled id="username" placeholder="用户名" type="text" value="@bui.username">
											</div>
										</div>
										<div class="form-group">
											<label for="realname" class="col-lg-2 control-label">真实姓名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="realname" id="realname" placeholder="真实姓名" type="text" value="@bui.realname">
											</div>
										</div>
										<div class="form-group">
											<label for="gender" class="col-lg-2 control-label">性别</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="gender" id="gender" placeholder="性别" type="text" value="@bui.gender">
											</div>
										</div>
										<div class="form-group">
											<label for="birth" class="col-lg-2 control-label">生日</label>
						
											<div class="col-lg-10">
												 <input class="form-control" name="birth" id="birth" placeholder="生日" type="text" readonly data-date-format="yyyy-mm-dd" value="@bui.birth">
											</div>
										</div>
										<div class="form-group">
											<label for="birth_addr" class="col-lg-2 control-label">出生地</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="birth_addr" id="birth_addr" placeholder="出生地" type="text" value="@bui.birth_addr">
											</div>
										</div>
										<div class="form-group">
											<label for="domicile" class="col-lg-2 control-label">居住地</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="domicile" id="domicile" placeholder="居住地" type="text" value="@bui.domicile">
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="link">
						<div class="col-xs-12" id="link-show">
							<div class="col-xs-11">
								<h4>@session.get("username") 的联系方式</h4>
							</div>
							<div class="col-xs-1">
						    	<button id="link-btn" class="btn btn-sm btn-primary">修改</button>
						    </div>
							<table class="table table-responsive">
								<tbody>
									<tr>
										<td>用户名</td>
										<td>@lui.username</td>
									</tr>
									<tr>
										<td>电话</td>
										<td>@lui.tel</td>
									</tr>
									<tr>
										<td>手机号码</td>
										<td>@lui.mobile</td>
									</tr>
									<tr>
										<td>电子邮箱</td>
										<td>@lui.email</td>
									</tr>
									<tr>
										<td>QQ</td>
										<td>@lui.qq</td>
									</tr>
									<tr>
										<td>MSN</td>
										<td>@lui.msn</td>
									</tr>
									<tr>
										<td>旺旺</td>
										<td>@lui.wangwang</td>
									</tr>
									<tr>
										<td>支付宝</td>
										<td>@lui.alipay</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="col-xs-12 hide" id="link-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/link/modify">
									<fieldset>
										<h4>@session.get("username") 的联系方式</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="username" class="col-lg-2 control-label">用户名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="username" disabled id="username" placeholder="用户名" type="text" value="@lui.username">
											</div>
										</div>
										<div class="form-group">
											<label for="tel" class="col-lg-2 control-label">电话</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="tel" id="tel" placeholder="电话" type="text" value="@lui.tel">
											</div>
										</div>
										<div class="form-group">
											<label for="mobile" class="col-lg-2 control-label">手机号码</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="mobile" id="mobile"
												@if(lui.mobile_status){ readonly }
												 placeholder="手机号码" type="text" value="@lui.mobile"> @if(lui.mobile_status){ <span class="text-warning">已绑定</span>  }
											</div>
										</div>
										<div class="form-group">
											<label for="email" class="col-lg-2 control-label">电子邮箱</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="email" id="email"
												@if(lui.email_status){ readonly }
												 placeholder="电子邮箱" type="text" value="@lui.email"> @if(lui.email_status){ <span class="text-warning">已绑定</span> }
											</div>
										</div>
										<div class="form-group">
											<label for="qq" class="col-lg-2 control-label">QQ</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="qq" id="qq" placeholder="QQ" type="text" value="@lui.qq">
											</div>
										</div>
										<div class="form-group">
											<label for="msn" class="col-lg-2 control-label">MSN</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="msn" id="msn" placeholder="MSN" type="text" value="@lui.msn">
											</div>
										</div>
										<div class="form-group">
											<label for="wangwang" class="col-lg-2 control-label">旺旺</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="wangwang" id="wangwang" placeholder="旺旺" type="text" value="@lui.wangwang">
											</div>
										</div>
										<div class="form-group">
											<label for="alipay" class="col-lg-2 control-label">支付宝</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="alipay" id="alipay" placeholder="支付宝" type="text" value="@lui.alipay">
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="edu">
						<div class="col-xs-12" id="edu-show">
							<div class="col-xs-11">
								<h4>@session.get("username") 的教育情况</h4>
							</div>
							<div class="col-xs-1">
						    	<button id="edu-btn" class="btn btn-sm btn-primary">修改</button>
						    </div>
							<table class="table table-responsive">
								<tbody>
									<tr>
										<td>用户名</td>
										<td>@eui.username</td>
									</tr>
									<tr>
										<td>毕业院校</td>
										<td>@eui.graduate</td>
									</tr>
									<tr>
										<td>学历</td>
										<td>@eui.education</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="col-xs-12 hide" id="edu-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/edu/modify">
									<fieldset>
										<h4>@session.get("username") 的教育情况</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="username" class="col-lg-2 control-label">用户名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="username" disabled id="username" placeholder="用户名" type="text" value="@eui.username">
											</div>
										</div>
										<div class="form-group">
											<label for="graduate" class="col-lg-2 control-label">毕业院校</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="graduate" id="graduate" placeholder="毕业院校" type="text" value="@eui.graduate">
											</div>
										</div>
										<div class="form-group">
											<label for="education" class="col-lg-2 control-label">学历</label>
						
											<div class="col-lg-10">
									            <select class="form-control" name="education" id="education">
											      <option @if(eui.education == "博士"){ selected }>博士</option>
											      <option @if(eui.education == "硕士"){ selected }>硕士</option>
											      <option @if(eui.education == "本科"){ selected }>本科</option>
											      <option @if(eui.education == "专科"){ selected }>专科</option>
											      <option @if(eui.education == "中专"){ selected }>中专</option>
											      <option @if(eui.education == "高中"){ selected }>高中</option>
											      <option @if(eui.education == "初中"){ selected }>初中</option>
											      <option @if(eui.education == "小学"){ selected }>小学</option>
											     </select>
												
												<!-- <input class="form-control" name="education" id="education" placeholder="学历" type="text" value="@eui.education"> -->
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="work">
						<div class="col-xs-12" id="work-show">
							<div class="col-xs-11">
								<h4>@session.get("username") 的工作情况</h4>
							</div>
							<div class="col-xs-1">
						    	<button id="work-btn" class="btn btn-sm btn-primary">修改</button>
						    </div>
							<table class="table table-responsive">
								<tbody>
									<tr>
										<td>用户名</td>
										<td>@wui.username</td>
									</tr>
									<tr>
										<td>公司</td>
										<td>@wui.company</td>
									</tr>
									<tr>
										<td>职业</td>
										<td>@wui.profession</td>
									</tr>
									<tr>
										<td>职位</td>
										<td>@wui.job</td>
									</tr>
									<tr>
										<td>年收入</td>
										<td>@wui.income</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="col-xs-12 hide" id="work-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/work/modify">
									<fieldset>
										<h4>@session.get("username") 的工作情况</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="username" class="col-lg-2 control-label">用户名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="username" disabled id="username" placeholder="用户名" type="text" value="@wui.username">
											</div>
										</div>
										<div class="form-group">
											<label for="company" class="col-lg-2 control-label">公司</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="company" id="company" placeholder="公司" type="text" value="@wui.company">
											</div>
										</div>
										<div class="form-group">
											<label for="profession" class="col-lg-2 control-label">职业</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="profession" id="profession" placeholder="职业" type="text" value="@wui.profession">
											</div>
										</div>
										<div class="form-group">
											<label for="job" class="col-lg-2 control-label">职位</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="job" id="job" placeholder="职位" type="text" value="@wui.job">
											</div>
										</div>
										<div class="form-group">
											<label for="income" class="col-lg-2 control-label">年收入</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="income" id="income" placeholder="年收入" type="text" value="@wui.income">
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="profile">
						<div class="col-xs-12" id="profile-show">
							<div class="col-xs-11">
								<h4>@session.get("username")的个人资料</h4>
							</div>
							<div class="col-xs-1">
						    	<button id="profile-btn" class="btn btn-sm btn-primary">修改</button>
						    </div>
							<table class="table table-responsive">
								<tbody>
									<tr>
										<td>用户名</td>
										<td>@pui.username</td>
									</tr>
									<tr>
										<td>证件类型</td>
										<td>@pui.cardtype</td>
									</tr>
									<tr>
										<td>证件号码</td>
										<td>@pui.cardid</td>
									</tr>
									<tr>
										<td>邮寄地址</td>
										<td>@pui.post_addr</td>
									</tr>
									<tr>
										<td>邮编</td>
										<td>@pui.post_code</td>
									</tr>
									<tr>
										<td>个人主页</td>
										<td>@pui.web_url</td>
									</tr>
									<tr>
										<td>自我介绍</td>
										<td>@pui.self_desc</td>
									</tr>
									<tr>
										<td>兴趣爱好</td>
										<td>@pui.interest</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="col-xs-12 hide" id="profile-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/person/modify">
									<fieldset>
										<h4>@session.get("username") 的个人资料</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="username" class="col-lg-2 control-label">用户名</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="username" disabled id="username" placeholder="用户名" type="text" value="@pui.username">
											</div>
										</div>
										<div class="form-group">
											<label for="cardtype" class="col-lg-2 control-label">证件类型</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="cardtype" id="cardtype" placeholder="证件类型" type="text" value="@pui.cardtype">
											</div>
										</div>
										<div class="form-group">
											<label for="cardid" class="col-lg-2 control-label">证件号码</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="cardid" id="cardid" placeholder="证件号码" type="text" value="@pui.cardid">
											</div>
										</div>
										<div class="form-group">
											<label for="post_addr" class="col-lg-2 control-label">邮寄地址</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="post_addr" id="post_addr" placeholder="邮寄地址" type="text" value="@pui.post_addr">
											</div>
										</div>
										<div class="form-group">
											<label for="post_code" class="col-lg-2 control-label">邮编</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="post_code" id="post_code" placeholder="邮编" type="text" value="@pui.post_code">
											</div>
										</div>
										<div class="form-group">
											<label for="web_url" class="col-lg-2 control-label">个人主页</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="web_url" id="web_url" placeholder="个人主页" type="text" value="@pui.web_url">
											</div>
										</div>
										<div class="form-group">
											<label for="self_desc" class="col-lg-2 control-label">自我介绍</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="self_desc" id="self_desc" placeholder="自我介绍" type="text" value="@pui.self_desc">
											</div>
										</div>
										<div class="form-group">
											<label for="interest" class="col-lg-2 control-label">兴趣爱好</label>
						
											<div class="col-lg-10">
												<input class="form-control" name="interest" id="interest" placeholder="兴趣爱好" type="text" value="@pui.interest">
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
					<div class="tab-pane fade" id="portrait">
						<div class="col-xs-12" id="profile-edit">
							<div class="col-lg-8">
								<form class="form-horizontal" method="post" action="/user/portrait/modify"  enctype="multipart/form-data">
									<fieldset>
										<h4>@session.get("username") 的个人头像</h4>
										<div class="col-xs-12">
											<div id="prompt" class="alert alert-dismissable alert-warning hide">
									  			<p><b></b></p>
											</div>
										</div>
										<div class="form-group">
											<label for="portrait" class="col-lg-2 control-label">上传头像</label>
						
											<div class="col-lg-10">
												<input class="form-control hide" name="portrait" id="portrait-pic" placeholder="上传头像" type="file" >
												<button id="upload-pic" type="button" class="btn btn btn-warning">上传头像</button>
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-4 col-lg-offset-4">
												<button id="reg-btn" type="submit" class="btn btn-primary">修改</button>
											</div>
										</div>
									</fieldset>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
}
